<MPSCNNInstanceNormalizationDataSource >(3) MetalPerformanceShaders.framework <MPSCNNInstanceNormalizationDataSource >(3)

<MPSCNNInstanceNormalizationDataSource >

#import <MPSCNNInstanceNormalization.h>

Inherits <MPSNNGradientStateNSObject>, and <NSCopying>.


(float *__nullable) - gamma
(float *__nullable) - beta
(NSString *__nullable) - label
(MPSCNNNormalizationGammaAndBetaState *__nullable) - updateGammaAndBetaWithCommandBuffer:instanceNormalizationStateBatch:
(BOOL) - updateGammaAndBetaWithInstanceNormalizationStateBatch:
(float) - epsilon
(void) - encodeWithCoder:
(nullable instancetype) - initWithCoder:
(nonnull instancetype) - copyWithZone:device:


NSUInteger numberOfFeatureChannels
BOOL supportsSecureCoding

- (float* __nullable MPSCNNInstanceNormalizationDataSource) beta [required]

Return a pointer to an array containing the beta terms.

- (nonnull instancetype MPSCNNInstanceNormalizationDataSource) copyWithZone: (nullable NSZone *) zone(nullable id< MTLDevice >) device

Optional copy method to create a copy of the data source for use with a new device.

Parameters:

zone The NSZone on which to allocate.
device The device where the kernel which uses this data source will be used.

Returns:

A pointer to a copy of this data source.

- (void MPSCNNInstanceNormalizationDataSource) encodeWithCoder: (NSCoder *__nonnull) aCoder [optional]

Optional NSSecureCoding compatibility.

- (float MPSCNNInstanceNormalizationDataSource) epsilon [optional]

An optional tiny number to use to maintain numerical stability. output_image = (input_image - mean[c]) * gamma[c] / sqrt(variance[c] + epsilon) + beta[c]; Defalt value if method unavailable: FLT_MIN

- (float* __nullable MPSCNNInstanceNormalizationDataSource) gamma [required]

Return a pointer to an array containing the gamma terms.

- (nullable instancetype MPSCNNInstanceNormalizationDataSource) initWithCoder: (NSCoder *__nonnull) aDecoder [optional]

- (NSString* __nullable MPSCNNInstanceNormalizationDataSource) label

A label that is transferred to the instance normalization filter at init time Overridden by a MPSCNNInstanceNormalizationNode.label if it is non-nil.

- (MPSCNNNormalizationGammaAndBetaState * __nullable MPSCNNInstanceNormalizationDataSource) updateGammaAndBetaWithCommandBuffer: (nonnull id< MTLCommandBuffer >) commandBuffer(MPSCNNInstanceNormalizationGradientStateBatch *__nonnull) instanceNormalizationStateBatch [optional]

Compute new gamma and beta values using current values and gradients contained within a MPSCNNInstanceNormalizationStateBatch. This is for use in the context of training a network within a MPSNNGraph. If you are writing your own graph using the low level interface or aren't training instance normalization it isn't needed.

In this mathod, you should perform the update on a GPU, because at the time it is called the data isn't in the state objects yet and the CPU can't do the work. You should not attempt to update the MPSCNNInstanceNormalization kernel directly with the results. The state object returned from the function will be used for that. A batch of states will be passed in. You should accumulate the gradients and then update the weights.

This operation is expected to also decrement the read count of instanceNormalizationStateBatch by 1, if the states are temporary.

Parameters:

commandBuffer The command buffer on which to encode the update.
instanceNormalizationStateBatch A batch of MPSCNNInstanceNormalizationGradientState objects containing current weights and gradients.

Returns:

A MPSCNNNormalizationGammaAndBetaState object containing updated gamma and beta values. If NULL no update was performed.

- (BOOL MPSCNNInstanceNormalizationDataSource) updateGammaAndBetaWithInstanceNormalizationStateBatch: (MPSCNNInstanceNormalizationGradientStateBatch *__nonnull) instanceNormalizationStateBatch [optional]

Compute new gamma and beta values using current values and gradients contained within a batch MPSCNNInstanceNormalizationState objects. Perform the update on the CPU.

Parameters:

instanceNormalizationStateBatch A batch of MPSCNNInstanceNormalizationGradientState objects containing current gamma and beta values and gradients.

Returns:

A boolean value indicating if the update was performed.

- (NSUInteger MPSCNNInstanceNormalizationDataSource) numberOfFeatureChannels [read], [nonatomic], [assign]

- (BOOL MPSCNNInstanceNormalizationDataSource) supportsSecureCoding [read], [optional], [atomic], [assign]

Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.

Mon Jul 9 2018 Version MetalPerformanceShaders-119.3